﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using Notepad_X;
using Notepad_X.Plugin;


namespace TranslationEditorPlugin
{
    public class TranslationEditor : IPlugin
    {
        Main main;

        ToolStripMenuItem menuItem = new ToolStripMenuItem();

        public string Description
        {get
            { return "Notepad X Translations Editor"; }
        }
        public string Author
        {get
            { return "NohponeX"; }
        }

        public string Name
        { get 
            { return "Translation Editor"; }
        }
        public string Version
        { get 
            { return "1.50"; } 
        }

        private void handler_menuItem(object sender, EventArgs e)
        {
            Editor NewEditor = new Editor();
            NewEditor.Show();
        }
        public void Initialize()
        {
            main = Notepad_X.Static.MainInstance;
            
            menuItem.Name = "TranslationEditor";
            menuItem.Text = "Translation Editor";
            menuItem.Image = TranslationEditorPlugin.Properties.Resources.tag_blue;
            menuItem.Click += handler_menuItem;

            main.system_menuItem_Get("Menu_Tools").DropDownItems.Insert(2, menuItem);

            
        }
        public void Dispose()
        {
            main.system_menuItem_Get("Menu_Tools").DropDownItems.Remove(menuItem);
            menuItem = null;
            //menuItem.Dispose();
        }
    }
}
